Skip to content

feat: helper to memoize 2 parameter function#7778

Merged
Rathoz merged 1 commit into
mainfrom
feat-memoize2
Jul 7, 2026
Merged

feat: helper to memoize 2 parameter function#7778
Rathoz merged 1 commit into
mainfrom
feat-memoize2

Conversation

@Rathoz

@Rathoz Rathoz commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

A 2 parameter version of memorize, as it's needed for #7777

How did you test this change?

Busted and via #7777

Comment thread lua/wikis/commons/FnUtil.lua
@mbergen

mbergen commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

@hjpalpha @ElectricalBoy opinions on restricting the arguments to by-value types as proposed?

@ElectricalBoy

Copy link
Copy Markdown
Collaborator

don't really have a strong opinion either way

@mbergen

mbergen commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Actually, nevermind, there's usage with tables:

TiebreakerGameUtil.getGames = FnUtil.memoize(function (opponent)

@mbergen mbergen marked this pull request as ready for review July 7, 2026 07:23
@mbergen mbergen requested review from a team as code owners July 7, 2026 07:23
@Rathoz Rathoz merged commit 79c3dc6 into main Jul 7, 2026
12 checks passed
@Rathoz Rathoz deleted the feat-memoize2 branch July 7, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants